package code.main.view.table
{
	import code.common.assets.AssetsClassName;
	
	import com.bit101.utils.MinimalConfigurator;
	import com.yy.manager.ResourceManager;
	import com.yy.ui.controls.Button;
	import com.yy.ui.controls.ScaleButton;
	
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	import flash.text.TextField;
	
	/**
	 *买入对话框 view 
	 * @author YY
	 * 
	 */
	public class BuyInDlgView extends Sprite
	{
		
		public var view:MovieClip;//ui资源
		
		public var minBuyInBtn:Button;//最小买入
		public var maxBuyInBtn:Button;//最大买入
		public var buyBtn:SimpleButton;//买入按钮
		public var reduceBtn:SimpleButton;//减少按钮
		public var increaseBtn:SimpleButton;//增加按钮
		public var closeBtn:Button;//关闭按钮
		public var gameTips:TextField;//买入提示
		public var restMoney:TextField;//现有存款
		public var minText:TextField;//最小买入文本
		public var maxText:TextField;//最大买入文本
		public var chipsCount:TextField;//输入买入筹码
		
		public function BuyInDlgView()
		{
			super();
			
			init();
		}
		
		private function init():void {
			view = ResourceManager.getMovieClipByName(AssetsClassName.BUY_IN_DLG_UI);
			addChild(view);
			var dobj:DisplayObject;
			buyBtn = view.buyBtn;
			reduceBtn = view.inputBg.reduceBtn;
			increaseBtn = view.inputBg.increaseBtn;
			minBuyInBtn = new Button(view.minBuyIn);
			minBuyInBtn.mouseChildren = false;
			minText = view.minBuyIn.minBuy;
			maxBuyInBtn = new Button(view.maxBuyIn);
			maxBuyInBtn.mouseChildren = false;
			maxText = view.maxBuyIn.maxBuy;
			restMoney = view.restMoney;
			restMoney.mouseEnabled = false;
			gameTips = view.gameTips;
			gameTips.mouseEnabled = false;
			chipsCount = view.chipsCount;
			chipsCount.mouseEnabled = true;
			chipsCount.selectable = true;
			chipsCount.restrict = "0-9";
			closeBtn = new Button(view.closeBtn);
			view.addChild(minBuyInBtn);
			view.addChild(maxBuyInBtn);
			view.addChild(closeBtn);
		}
	}
}